//
//  ANWebService+Product.h
//  Ants
//
//  Created by ZHM on 16/7/4.
//  Copyright © 2016年 ZHM. All rights reserved.
//

#import "ANWebService.h"

@interface ANWebService (Product)



/**
 * 获取分类
 */
- (void)fetchProductCategoryCompletion:(void(^)(NSArray *productCategorys, NSError *error))completion;
/**
 * 获取商品数量
 */
- (void)fetchProductQuantity:(ANBDProduct *)product completion:(void(^)(NSInteger quantity, NSError *error))completion;
/**
 * 上传图片
 */
- (void)uploadPhotos:(NSArray *)images completion:(void(^)(NSArray *filePaths, BOOL succeeded, NSError *error))completion;
/**
 * 删除上传文件
 */
- (void)removeFilesWithArray:(NSArray *)urls completion:(void(^)(NSArray *filePaths, BOOL succeeded, NSError *error))completion;
/**
 * 发布新商品
 */
- (void)releaseNewProduct:(ANBDProduct *)product Category:(ANBDProductCategory *)category completion:(void(^)(BOOL succeeded, NSError *error))completion;
/**
 * 修改商品
 */
- (void)updateProduct:(ANBDProduct *)product Category:(ANBDProductCategory *)category beforeCategory:(ANBDProductCategory *)beforeCategory completion:(void(^)(BOOL succeeded, NSError *error))completion;
/**
 * 删除商品
 */
- (void)removeProduct:(ANBDProduct *)product isRemoveWeb:(BOOL)isRemoveWeb completion:(void(^)(BOOL succeeded, NSError *error))completion;
/**
 * 获取商品列表
 */
- (void)fetchProductsFromParam:(ANProductGetParam*)param completion:(void(^)(NSArray *products, BOOL isReachEnd, NSError *error))completion;
/**
 * 获取当前用户发布商品
 */
//- (void)fetchCurrentUserProductsFromPage:(NSUInteger)page completion:(void(^)(NSArray *products, BOOL isReachEnd, NSError *error))completion;




@end
